package com.battle.pojo.entity;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.battle.pojo.enums.CaseTypeEnum;
import com.battle.pojo.enums.CaseStatusEnum;
import com.battle.pojo.enums.OrganizationTypeEnum;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import lombok.Data;
import nirvana.core.domains.ann.AccEntity;
import nirvana.core.domains.entity.DomainBaseEntity;
import nirvana.core.domains.enums.EntityType;

import java.time.LocalDateTime;

/**
 * @author anni.zhu
 * @author anni.zhu@king-v.com
 * Created in 2024/8/22 14:33
 */
@Data
@TableName(value = "CASE_BASE_INFO",autoResultMap = true)
@Entity(name = "CASE_BASE_INFO")
@AccEntity(value = "战例", type = EntityType.SERVICE_ENTITY)
public class CaseBaseInfo extends DomainBaseEntity<CaseBaseInfo> {
    /**
     * 警情id
     */
    @Column()
    private Long sirensId;

    /**
     * 战例名称
     */
    @Column()
    private String name;

    /**
     * 类型  0接警盘 1站巡处
     */
    @Column()
    private CaseTypeEnum type;

    /**
     * 组织类型=战例级别
     */
    @Column()
    private OrganizationTypeEnum organizationType;

    /**
     * 状态 0待提交 1待审核 2已驳回 3已发布 4已下架
     */
    @Column()
    private CaseStatusEnum status;

    /**
     * 下架备注
     */
    @Column
    private String soldOutRemark;

    /**
     * 等级
     */
    @Column(length = 255)
    private String level;

    /**
     * 案件类型
     */
    @Column(length = 255)
    private String caseType;

    /**
     * 救援城市
     */
    @Column(length = 255)
    private String city;

//    /**
//     * 发布机构
//     */
//    @Column()
//    @TableField(updateStrategy = FieldStrategy.IGNORED)
//    private Long issueDepartmentId;

    /**
     * 发布人
     */
    @Column()
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private Long issueUserId;

    /**
     * 发布日期
     */
    @Column()
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private LocalDateTime issueDate;


    /**
     * 提交人
     */
    @Column()
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private Long submitUserId;

    /**
     * 提交时间
     */
    @Column()
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private LocalDateTime submitDate;

    /**
     * 审批人
     */
    @Column()
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private Long approvalUserId;

    /**
     * 审批时间
     */
    @Column()
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private LocalDateTime approvalDate;

    /**
     * 审批备注
     */
    @Column()
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String approvalRemark;

    /**
     * 是否导入
     */
    @Column()
    private Boolean isImport;

    /**
     * 导入的pdf的url
     */
    @Column()
    private String importPdfUrl;
}
